{% extends "PATHomeBundle::base.html.twig" %}
{% block title %}
{{ parent() }} Accueil
{% endblock title %}
{% block head %}
{{ parent() }}
<link rel="stylesheet" href="{{ asset('bundles/pathome/css/home.css') }}" type="text/css" />
{% endblock head %}
{% block body %}
<div id="offers">

<div id="example">
    <img src="{{ asset('pictures/design/new-ribbon.png') }}" width="112" height="112" alt="New Ribbon" id="ribbon">
        <div id="slides">
                <div class="slides_container">
                        <div class="slide">
                                <a href="#" title="" target="_blank"><img src="{{ asset('pictures/design/slide1.jpg') }}" width="570" height="270" alt="Slide 1"></a>
                                <div class="caption" style="bottom:0">
                                        <p>Février 2013 : Mise en ligne du site</p>
                                </div>
                        </div>
                        <div class="slide">
                                <a href="{{ path("pat_product_display",{'id' : '10' } ) }}" title="Achetez-le vite !"><img src="{{ asset('pictures/design/slide2.png') }}" width="570" height="270" alt="Slide 2"></a>
                                <div class="caption">
                                        <p>Pokémon 2 le film : Le pouvoir est en toi</p>
                                </div>
                        </div>
                        <div class="slide">
                                <a href="{{ path("pat_product_productByCategory",{'id' : '2' } ) }}" title="Cartes à collectionner" ><img src="{{ asset('pictures/design/slide3.png') }}" width="570" height="270" alt="Slide 3"></a>
                                <div class="caption">
                                        <p>Découvrez nos séries de cartes à collectionner !</p>
                                </div>
                        </div>
                        <div class="slide">
                                <a href="{{ path("pat_product_productByCategory",{'id' : '6' } ) }}" title="Prêt-à-porter Pokémon" target="_blank"><img src="{{ asset('pictures/design/slide4.png') }}" width="570" height="270" alt="Slide 4"></a>
                                <div class="caption">
                                        <p>Habille-toi à la mode Pokémon !</p>
                                </div>
                        </div>
                        <div class="slide">
                                <a href="{{ path("pat_product_display",{'id' : '2' } ) }}" title="Pokémon version Bleu" target="_blank"><img src="{{ asset('pictures/design/slide5.png') }}" width="570" height="270" alt="Slide 5"></a>
                                <div class="caption">
                                        <p>Redécouvrez les grands classiques du jeu vidéo</p>
                                </div>
                        </div>
                </div>
                <a href="#" class="prev"><img src="{{ asset('pictures/design/arrow-prev.png') }}" width="24" height="43" alt="Arrow Prev"></a>
                <a href="#" class="next"><img src="{{ asset('pictures/design/arrow-next.png') }}" width="24" height="43" alt="Arrow Next"></a>
        </div>
        <img src="{{ asset('pictures/design/example-frame.png') }}" width="739" height="341" alt="Example Frame" id="frame">
    </div>
	<div id="offerGame"></div>
</div>
<br />
<br />
    <p><strong>Meilleures ventes</strong></p>
<div id="top_sales">

{% for item in liste_product_top_sales %}
        <div class="catalogItem">
            <div class="catalogItem_default">
                <a href="{{ path("pat_product_display", {'id': item[0].id}) }}">
                    <div class="catalogItem_img">
                        {% if item[0].picture.url is defined %}
                            <img src = "{{ asset('bundles/patproduct/images/' ~ item[0].picture.url) }}"  alt = {{ item[0].picture.title }} />
                        {% else %}
                            <img src = "{{ asset('bundles/pathome/images/image_non_disponible') }}" alt="image non disponible"/>
                        {% endif %}
                    </div>
                    <div class="catalogItem_title">
                        {{ item[0].name }}
                    </div>
                </a>
            </div>
        </div>
{% endfor %}
</div>

    <p><strong>Produits préferés</strong></p>
<div id="top_rate">

{% for product in liste_product_top_rate %}
        <div class="catalogItem">
            <div class="catalogItem_default">
                <a href="{{ path("pat_product_display", {'id': product.id}) }}">
                    <div class="catalogItem_img">
                        {% if product.picture.url is defined %}
                            <img src = "{{ asset('bundles/patproduct/images/' ~ product.picture.url) }}"  alt = {{ product.picture.title }} />
                        {% else %}
                            <img src = "{{ asset('bundles/pathome/images/image_non_disponible') }}" alt="image non disponible"/>
                        {% endif %}
                    </div>
                    <div class="catalogItem_title">
                        {{ product.name }}
                    </div>
                </a>
            </div>
        </div>
{% endfor %}
</div>
{% endblock body %}